import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter2/extends.dart';

class ButtonApp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('ButtonApp'),
      ),
      body: Column(
        children: <Widget>[
          RaisedButton(
            child: Text('RaisedButton'),
            onPressed: (){
              showToast('msg');
            },
          ),
          FlatButton(
            child: Text('FlatButton'),
            onPressed: (){
              showToast('msg');
            },
            highlightColor: Colors.blue[600],//高亮颜色
            // colorBrightness: Brightness.light,//初始颜色是高亮还是透明
            splashColor: Colors.red,//初始点击时水波纹的颜色
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
          ),
          OutlineButton(
            child: Text('OutlineButton'),
            onPressed: (){
              showToast('msg');
            },
          ),
          IconButton(
            icon: Icon(Icons.add),
            onPressed: (){
              showToast('msg');
            },
          ),
        ],
      ),
    );
  }

}